<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hello</title>
</head>
<body>
<div id="root"></div>

<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

<script type="text/babel">
    //React 18 之前
    //ReactDOM.render(<h2>Hello World</h2>, document.querySelector("#root"))
    //React 18 之后, 可以有多个根
    const root = ReactDOM.createRoot(document.querySelector("#root"))
    root.render(<h2>Hello React</h2>)
    // const app = ReactDOM.createRoot(document.querySelector("#app"))
    // app.render(<h2>hello world</h2>)
</script>

</body>
</html>
